﻿@using DormMS.Model.ViewModels;
@{
    Layout = "";
    ViewBag.MenuId = 4;
}
@model V_Member
<div class="w_percenter" ng-controller="UserCenterController">
    <div class="w_pct_top">
        <div class="w_pctop_head"><img src="{{Model.Avatar}}" /></div>
        <div class="w_pctop_mida">
            <div>{{Model.NickName}}</div>
            <p class="w_pcinfo_hylevel"><img src="/Content/images/w_19.png" class="w_pcinfo_king" />{{Model.LevelDes}}</p>
            <a class="w_pctop_midab">余额:¥{{Model.Balance}}</a>
        </div>

        <a ng-click="$state.go('user.info')" class="w_pctop_acmanage">账号管理</a>
    </div>
    <ul class="w_pct_state">
        <li>
            <a ng-click="$state.go('user.order',{status:1})">
                <img src="/Content/images/w_22.png" class="w_pctState_flag" />
                <p>待付款</p>
            </a>
        </li>
        <li>
            <a ng-click="$state.go('user.order',{status:2})">
                <img src="/Content/images/w_23.png" class="w_pctState_flag" />
                <p>待收货</p>
            </a>
        </li>
        <li>
            <a ng-click="$state.go('user.order',{status:3})">
                <img src="/Content/images/w_24.png" class="w_pctState_flag" />
                <p>待评价</p>
            </a>
        </li>
        <li>
            <a ng-click="$state.go('user.order',{status:4})">
                <img src="/Content/images/w_25.png" class="w_pctState_flag" />
                <p>退款</p>
            </a>
        </li>
        <li>
            <a ng-click="$state.go('user.order')">
                <img src="/Content/images/w_26.png" class="w_pctState_flag" />
                <p>我的订单</p>
            </a>
            <img src="/Content/images/w_36.png" class="w_pctState_line" />
        </li>
    </ul>
    <div class="w_pct_more">
        <div class="w_pctMore_left">
            <a ng-click="$state.go('user.coupon');">
                <img src="/Content/images/w_27.png" />
                <div>
                    优惠券
                    <p><font color="eb272a">@ViewBag.CouponCount</font>张可用</p>
                </div>
            </a>
        </div>
        <ul class="w_pctMore_right">
            <li ng-click="$state.go('user.sign');"><a><img src="/Content/images/w_28.png" class="w_pctMore_flag1" /><p>签到领积分</p></a></li>
            <li ng-click="$state.go('user.pointDetail');"><a><img src="/Content/images/w_29.png" class="w_pctMore_flag2" /><p>我的积分&nbsp;<font color="#ff7072">{{Model.Points}}</font></p></a></li>
        </ul>
    </div>
    <ul class="w_pct_more2">
        <li ui-sref="shop.favorite">
                <img src="/Content/images/w_30.png" />
                <p>我的收藏</p>
        </li>
        <li ui-sref="activity.myactivity">
            <img src="/Content/images/w_31.png" />
            <p>我的活动</p>
        </li>
        <li ng-click="$state.go('user.address')">
                <img src="/Content/images/w_32.png" />
                <p>我的地址</p>
        </li>
    </ul>


    @Html.Partial("_homefoot")
</div>
<script>
    App.controller('UserCenterController', [
        '$scope', '$state', '$route', '$rootScope', '$http',
            function ($scope, $state, $route, $rootScope, $http) {
                layer.load(2);
                $http.post("/UserCenter/GetMemberInfo").then(function (response) {
                    layer.closeAll('loading');
                    if (response.data.isSuccess) {
                        $scope.Model = angular.copy(response.data.data);
                    }

                });
                var tt = function () {
                    $rootScope.WxShare($rootScope.pageTitle(), '优品三悦', location.href, $rootScope.LogoUrl);
                }

                setTimeout(tt, 1000)
            }
    ]);


</script>